package com.zhuoyue.system.service.impl;

import java.util.List;

import com.zhuoyue.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhuoyue.system.mapper.TblGatewayLogMapper;
import com.zhuoyue.system.domain.TblGatewayLog;
import com.zhuoyue.system.service.ITblGatewayLogService;

/**
 * 网关操作日志Service业务层处理
 *
 * @author hewenze
 * @date 2020-12-24
 */
@Service
public class TblGatewayLogServiceImpl implements ITblGatewayLogService {
    @Autowired
    private TblGatewayLogMapper tblGatewayLogMapper;

    /**
     * 查询网关操作日志
     *
     * @param id 网关操作日志ID
     * @return 网关操作日志
     */
    @Override
    public TblGatewayLog selectTblGatewayLogById(Long id) {
        return tblGatewayLogMapper.selectTblGatewayLogById(id);
    }

    /**
     * 查询网关操作日志列表
     *
     * @param tblGatewayLog 网关操作日志
     * @return 网关操作日志
     */
    @Override
    public List<TblGatewayLog> selectTblGatewayLogList(TblGatewayLog tblGatewayLog) {
        return tblGatewayLogMapper.selectTblGatewayLogList(tblGatewayLog);
    }

    /**
     * 新增网关操作日志
     *
     * @param tblGatewayLog 网关操作日志
     * @return 结果
     */
    @Override
    public int insertTblGatewayLog(TblGatewayLog tblGatewayLog) {
        tblGatewayLog.setCreateTime(DateUtils.getNowDate());
        return tblGatewayLogMapper.insertTblGatewayLog(tblGatewayLog);
    }

    /**
     * 修改网关操作日志
     *
     * @param tblGatewayLog 网关操作日志
     * @return 结果
     */
    @Override
    public int updateTblGatewayLog(TblGatewayLog tblGatewayLog) {
        return tblGatewayLogMapper.updateTblGatewayLog(tblGatewayLog);
    }

    /**
     * 批量删除网关操作日志
     *
     * @param ids 需要删除的网关操作日志ID
     * @return 结果
     */
    @Override
    public int deleteTblGatewayLogByIds(Long[] ids) {
        return tblGatewayLogMapper.deleteTblGatewayLogByIds(ids);
    }

    /**
     * 删除网关操作日志信息
     *
     * @param id 网关操作日志ID
     * @return 结果
     */
    @Override
    public int deleteTblGatewayLogById(Long id) {
        return tblGatewayLogMapper.deleteTblGatewayLogById(id);
    }
}
